package com.zhn.evsi.client;

import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.Query;
import com.dtflys.forest.annotation.Request;
import com.dtflys.forest.annotation.Retry;
import com.dtflys.forest.annotation.Var;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 第三方api client
 * */
@Component
@Retry(maxRetryCount = "3", maxRetryInterval = "1000")
public interface ThirdClient {

    /**
     * 通过地区id和商品id获取价格 （eveMarketer.com）非官方
     * */
    // https://api.evemarketer.com/ec/marketstat/json?typeid=40701&regionlimit=10000002
    @Request(
            url = "https://api.evemarketer.com/ec/marketstat/json?typeid={typeid}",
            type = "POST"
    )
    List<JSONObject> marketstat(@Var("typeid") String typeId, @Query("regionlimit") String regionLimit);

}
